package test.ch01;

import com.sun.org.apache.xml.internal.serializer.ToStream;

public class Person {
    //1 : public
    //0 默认
  public int id;
  private String name;
  protected static Boolean sex;
  final String address ="第一职中";

  public Integer age =105;

  public Person() {
  }

  private Person(String name) {
   this.name = name;
  }

  protected Person(int id, String name, boolean sex) {
   this.id = id;
   this.name = name;
   this.sex = sex;
  }

     @Override
     public String toString() {
      return "Person{" +
              "id=" + id +
              ", name='" + name + '\'' +
              ", address='" + address + '\'' +
              '}';
     }

    private Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public int getId() {
        return id;
    }

    private void setId(int id) {
        this.id = id;
    }

    protected String getName() {
        return name;
    }

    void setName(String name) {
        this.name = name;
    }
}
